Skip to content

Fix #13306: Hour overflow in tz-aware datetime conversions. #13313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

uwedeportivo
Copy link
Contributor

@uwedeportivo uwedeportivo commented May 28, 2016

@codecov-io
Copy link

codecov-io commented May 28, 2016

Current coverage is 84.22%

Merging #13313 into master will decrease coverage by <.01%

@@             master     #13313   diff @@
==========================================
  Files           138        138          
  Lines         50713      50666    -47   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          42715      42672    -43   
+ Misses         7998       7994     -4   
  Partials          0          0          

Powered by Codecov. Last updated by fcd73ad...4ca6f0c

@jreback
Copy link
Contributor

jreback commented May 28, 2016

how would you know this worked without tests?

this needs 2 paths 1 if is_montonic (iow is sorted); 1 if not

@jreback jreback added Bug Timezones Timezone data dtype labels May 28, 2016
@uwedeportivo
Copy link
Contributor Author

let me know if you need anything else from me

@@ -898,6 +898,46 @@ def test_utc_with_system_utc(self):
# check that the time hasn't changed.
self.assertEqual(ts, ts.tz_convert(dateutil.tz.tzutc()))

def test_tslib_tz_convert_hour_overflow_dst_bug(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also put in tests for Timestamp (which are good, but for consistency). you can put in another test function.

@jreback
Copy link
Contributor

jreback commented May 31, 2016

pls add a whatsnew note as well (Bug fix section)

@uwedeportivo
Copy link
Contributor Author

ok, thanks. i'll do that stuff tonight

@jreback
Copy link
Contributor

jreback commented May 31, 2016

sure, ping when ready

@jreback
Copy link
Contributor

jreback commented Jun 1, 2016

can you add a whatsnew entry, otherwise lgtm.

@jreback jreback added this to the 0.18.2 milestone Jun 1, 2016
@uwedeportivo
Copy link
Contributor Author

Figured out how to add whatsnew entry :)

@uwedeportivo
Copy link
Contributor Author

sigh, will have to deal with conflict tonight. cannot do it at work. it's in the v0.18.2.txt file. feel free to resolve it yourself if you don't want to wait until tonight

@uwedeportivo
Copy link
Contributor Author

i'm done. take over if you're ok with it

@barisser
Copy link

barisser commented Jun 2, 2016

👍

@jreback jreback closed this in ce56542 Jun 2, 2016
@jreback
Copy link
Contributor

jreback commented Jun 2, 2016

thanks @uwedeportivo

yeah ideally we would check sortedness in the cython code (e.g. is_monotonic works for this and is fast. Though I can't produce a counterexample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hour overflow in tz-aware datetime conversions
4 participants